package com.uk.data.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity()
@Table(name="RRETHI")
public class Rrethi implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -8014126796484879814L;
	@Id
	private Integer id;
	private String tag;

	
	@ManyToOne
	private Qarku qarku;
	
	
	public Rrethi() {
		super();
		// TODO Auto-generated constructor stub
	}

	

	public Rrethi(Integer id, String tag, Qarku qarku) {
		super();
		this.id = id;
		this.tag = tag;
		this.qarku = qarku;
	}


	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public String getTag() {
		return tag;
	}


	public void setTag(String tag) {
		this.tag = tag;
	}





	public Qarku getQarku() {
		return qarku;
	}


	public void setQarku(Qarku qarku) {
		this.qarku = qarku;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((qarku == null) ? 0 : qarku.hashCode());
		result = prime * result + ((tag == null) ? 0 : tag.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Rrethi other = (Rrethi) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (qarku == null) {
			if (other.qarku != null)
				return false;
		} else if (!qarku.equals(other.qarku))
			return false;
		if (tag == null) {
			if (other.tag != null)
				return false;
		} else if (!tag.equals(other.tag))
			return false;
		return true;
	}
	
	
	
	
}
